home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 51
/
Mobiclic51.iso
/
pc
/
DATA
/
COMMUNS
/
MOBICLIC_MENUS.CST
/
00007_Script_gestion des sprites
< prev
next >
Wrap
Text File
|
2003-01-30
|
6KB
|
213 lines
-- procΘdures utilitaires
global volumeOn, sonEnCours, menusActifs, menuOuvert, traitLiaison
-- volumeOn : indique si la fenΩtre de rΘglage du volume est active
-- sonEnCours : contient le nom du dernier son jouΘ
-- gestion des rollOver
-- sur une image sans curseur perso
on glisserSur piste1,piste2,ecart1,ecart2
if volumeOn<>1 and menuOuvert=0 then
case the paramCount of
1:-- un seul paramΦtre
piste2 = piste1
ecart1=0
ecart2=0
2:-- deux paramΦtres
ecart1=0
ecart2=0
3:-- trois paramΦtres
ecart2=ecart1
end case
sprite(value(field "PPGS")).locH = the mouseH
sprite(value(field "PPGS")).locV = the mouseV
repeat with i=piste1 to piste2
if rollOver(i) and sprite value(field "PPGS") intersects i then
afficherPistes i+ecart1, i+ecart2
else
masquerPistes i+ecart1, i+ecart2
end if
end repeat
-- les pistes de numΘro les plus ΘlevΘs sont prioritaires
repeat with i= piste2 down to 1+piste1
if sprite(i+ecart1).visible = 1 then
repeat with j=piste1 to i-1
masquerPistes j+ecart1
if ecart2<>0 then
masquerPistes j+ecart2
end if
end repeat
end if
end repeat
end if
end glisserSur
-- sur une image avec curseur doigt et dissimulation de la piste cible
on glisserSurCM piste1,piste2,ecart1,ecart2
if volumeOn<>1 and menuOuvert=0 then
case the paramCount of
1:-- un seul paramΦtre
piste2 = piste1
ecart1 = 0
ecart2 = 0
2:-- deux paramΦtres
ecart1 = 0
ecart2 = 0
3:-- trois paramΦtres
ecart2 = ecart1
end case
sprite(value(field "PPGS")).locH = the mouseH
sprite(value(field "PPGS")).locV = the mouseV
repeat with i=piste1 to piste2
if rollOver(i) and sprite value(field "PPGS") intersects i then
sprite(i+ecart1).cursor = 280
masquerPistes i
afficherPistes i+ecart1, i+ecart2
else
afficherPistes i
masquerPistes i+ecart1, i+ecart2
end if
end repeat
end if
end glisserSurCM
-- sur une image avec curseur doigt sans dissmulation piste cible
on glisserSurC piste1,piste2,ecart1,ecart2
if volumeOn<>1 and menuOuvert=0 then
case the paramCount of
1:-- un seul paramΦtre
piste2 = piste1
ecart1 = 0
ecart2 = 0
2:-- deux paramΦtres
ecart1 = 0
ecart2 = 0
3:-- trois paramΦtres
ecart2 = ecart1
end case
sprite(value(field "PPGS")).locH = the mouseH
sprite(value(field "PPGS")).locV = the mouseV
repeat with i=piste1 to piste2
if rollOver(i) and sprite value(field "PPGS") intersects i then
sprite(i).cursor = 280
afficherPistes i+ecart1, i+ecart2
else
masquerPistes i+ecart1, i+ecart2
end if
end repeat
-- les pistes de numΘro les plus ΘlevΘs sont prioritaires
repeat with i= piste2 down to 1+piste1
if sprite(i+ecart1).visible = 1 then
repeat with j=piste1 to i-1
sprite(j+ecart1).visible = 0
if ecart2<>0 then
sprite(j+ecart2).visible = 0
end if
end repeat
end if
end repeat
end if
end glisserSurC
-- sur une image avec Θchange d'acteurs
on glisserSurSwich piste1,piste2,ecart,L1,L2
-- piste 1 : premiΦre piste du groupe de pistes
-- piste 2 : derniΦre piste du groupe de pistes
-- ecart : ecart entre les pistes survolΘes et les pistesmodifiΘes
-- L1 : liste des numΘros des acteurs occupant initialement les pistes
-- L2 : liste des numΘros des acteurs occupant les pistes aprΦs substitution
if volumeOn<>1 and menuOuvert=0 then
sprite(value(field "PPGS")).locH = the mouseH
sprite(value(field "PPGS")).locV = the mouseV
repeat with i=piste1 to piste2
if rollOver(i) and sprite value(field "PPGS") intersects i then
sprite(i).cursor = 280
sprite(i+ecart).memberNum = L2[i+1-piste1]
else
sprite(i+ecart).memberNum = L1[i+1-piste1]
end if
end repeat
end if
end glisserSurSwich
-- masquer des pistes
on masquerPistes
repeat with i=1 to the paramCount
if value(param(i))<>0 then
sprite(param(i)).visible = 0
else
listePistes1 param(i),0
end if
end repeat
end masquerPistes
-- afficher des pistes
on afficherPistes
repeat with i=1 to the paramCount
if value(param(i))<>0 then
sprite(param(i)).visible = 1
else
listePistes1 param(i),1
end if
end repeat
end afficherPistes
-- pistes esclaves
on spritesOn
repeat with i=1 to the paramCount
if value(param(i))<>0 then
puppetSprite (param(i)), true
else
listePistes2 param(i),1
end if
end repeat
end sprites On
on spritesOff
repeat with i=1 to the paramCount
if value(param(i))<>0 then
puppetSprite (param(i)), false
else
listePistes2 param(i),0
end if
end repeat
end sprites Off
-- gestion d'une liste de pistes du type "[premiΦre piste]>[derniΦre piste]"
--> pour affichage pistes
on listePistes1 chaine,v
n = offset(">", chaine)
n1 = value(chaine.char[1..n-1])
n2 = value(chaine.char[n+1..chaine.chars.count])
repeat with j=n1 to n2
sprite(j).visible = v
end repeat
end listePistes1
--> pour pistes sprites
on listePistes2 chaine,v
n = offset(">", chaine)
n1 = value(chaine.char[1..n-1])
n2 = value(chaine.char[n+1..chaine.chars.count])
repeat with j=n1 to n2
puppetSprite j,v
end repeat
end listePistes2
-- rend visibles toutes les pistes
on ╫
repeat with i=1 to 200
afficherPistes i
end repeat
end